STEP 1: Let's create a function that will run a scene in the park!

Remember, the Define Function line defines the function by creating the function and giving it a name.

  • Go to and drag out Define Function. Drop it at the bottom of your program.
  • Change the name of the function from my_function to park_scene.
  • Drop the Park background INSIDE your function by indenting it four spaces under the def line.

To navigate the page using the TAB key, first press ESC to exit the code editor.

sprite = codesters.Sprite("knight1", -175, -150) sprite.set_speed(2)
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)